﻿using System.ComponentModel;

namespace Marmat.Forms.Views.DataGrid
{
    public class RowColCancelEventArgs : RowColEventArgs
    {
        private CancelEventArgs _e;

        internal RowColCancelEventArgs(Forms.DataGrid gridControl, int rowHandle, Column column) : this(gridControl, rowHandle, column, new CancelEventArgs())
        {
        }

        internal RowColCancelEventArgs(Forms.DataGrid gridControl, int rowHandle, Column column, CancelEventArgs e) : base(gridControl, rowHandle, column)
        {
            this._e = e;
        }

        /// <summary>
        /// 获取或设置一个值，该值指示是否应取消事件。
        /// </summary>
        /// <returns>true 如果应取消事件;否则为 false。</returns>
        public bool Cancel
        {
            get
            {
                return this._e.Cancel;
            }

            set
            {
                this._e.Cancel = value;
            }
        }
    }
}